package src.itheima01;

import java.util.ArrayList;
import java.util.List;

public class A {
    public static void main(String[] args) {
        List<String>list=new ArrayList();
        list.add("11aad");
        list.add("2121");
        System.out.println(list.size());
        for (String s : list) {
            System.out.println(s);
        }
        list.add(2,"12121");//[11aad, 2121, 12121]
        System.out.println(list);
        list.add(2,"144");//[11aad, 2121, 144, 12121]
        System.out.println(list);
        String a=list.get(1);
        System.out.println(a);
        list.remove(2);
        System.out.println(list);//[11aad, 2121, 12121]
        list.set(0,"333");
        System.out.println(list);//[333, 2121, 12121]
    }
}
